﻿<local:DocumentBase x:Class="WPFExcelReport.JLTSAS"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core"
       Background="White" 
         Loaded="Window_Loaded" 
     >
    <local:DocumentBase.Resources>
    </local:DocumentBase.Resources>
    <Grid DataContext="{Binding}" Width="1021">
        <Grid.RowDefinitions>
            <RowDefinition Height="100" />
            <RowDefinition Height="150*" />
            <RowDefinition Height="200*" />
            <RowDefinition Height="50*" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="512*"></ColumnDefinition>
            <ColumnDefinition Width="463*"></ColumnDefinition>
            <ColumnDefinition Width="49*" />
        </Grid.ColumnDefinitions>
        <StackPanel Margin="0,0,19,0" Grid.RowSpan="4" Grid.ColumnSpan="2">
            <WrapPanel Width="950">
                <Label Content="品种号："    Width="68" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtARTICLE" Width="189" Margin="5,0,0,0"  HorizontalAlignment="Left" Background="Pink" Panel.ZIndex="1"
                         KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="20" FontSize="18" Foreground="#FF141111" Height="33" />
                <Label Content="业务员："    Width="68" Margin="10,0,0,0"  HorizontalAlignment="Left"   FontSize="18" VerticalAlignment="Center" Foreground="#FF141111" />
                <TextBox Name="txtSTAFF" Width="80" Margin="5,0,0,0"  HorizontalAlignment="Left" Background="Beige" Panel.ZIndex="2"
                         KeyUp="txtART_KeyUp" CharacterCasing="Upper" MaxLength="8" FontSize="18" Foreground="#FF141111" Height="33" />
                <Label Content="操作日期从" Height="26" HorizontalAlignment="Left" Margin="10,5,0,0" Name="label3" VerticalAlignment="Top" Width="74" FontSize="14" />
                <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,2,0,0" Name="FROM_DATE" VerticalAlignment="Top" Panel.ZIndex="4"
                                    SelectedDateChanged ="FROM_DATE_SelectedDateChanged" Width="103" />
                <Label Content="至" Height="28" HorizontalAlignment="Left" Margin="10,5,0,0" Name="label4" VerticalAlignment="Top" Width="19" FontSize="14" />
                <DatePicker Height="25" HorizontalAlignment="Left" Margin="0,2,0,0" Name="END_DATE" VerticalAlignment="Top" Panel.ZIndex="5"
                                    SelectedDateChanged ="END_DATE_SelectedDateChanged" Width="101" />                
                <Button Content="查询" Height="33" Margin="5,0,0,0"  Name="btnQuery" Width="67" Panel.ZIndex="9"
                        Click="btnQuery_Click"/>
                <Button Content="导出" Height="33" Margin="5,0,0,0"  Name="btnEXCEL" Width="67" Panel.ZIndex="10"
                        Click="btnEXCEL_Click"/>
            </WrapPanel>
        </StackPanel>
        <StackPanel Margin="0,35,19,0" Grid.RowSpan="4" Grid.ColumnSpan="2">
            <WrapPanel Width="952">
                <DataGrid CanUserReorderColumns="True"  
          CanUserResizeRows="True" CanUserSortColumns="True"
            AutoGenerateColumns="False"   
                  EnableRowVirtualization="True"  
                  Width="950"
                  Height="564" FontSize="11"
                  EnableColumnVirtualization="True"  
                  ScrollViewer.HorizontalScrollBarVisibility="Auto"
                  ScrollViewer.VerticalScrollBarVisibility="Auto"
                  RowDetailsVisibilityMode="VisibleWhenSelected" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                               IsSynchronizedWithCurrentItem="True" Opacity="10" Visibility="Visible"
                               ItemsSource="{Binding}" x:Name="MasterDg" 
                               Grid.ColumnSpan="2" Margin="0,5,0,0" Grid.RowSpan="3" Grid.Row="1">
                    <!--ART	VKKSACHBE	NAME	INQTY	CUTQTY	SHIPQTY	STOCKQTY-->
                    <DataGrid.Columns>
                        <DataGridTextColumn Binding="{Binding Path=ART}" Header="任务书" Width="SizeToCells" MinWidth="70" />
                        <DataGridTextColumn Binding="{Binding Path=VKKSACHBE}" Header="业务员代号" Width="SizeToCells" MinWidth="70" />
                        <DataGridTextColumn Binding="{Binding Path=NAME}" Header="业务员" Width="SizeToCells" MinWidth="70" />
                        <DataGridTextColumn Binding="{Binding Path=INQTY}" Header="回收印染数" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=CUTQTY}" Header="本厂取样" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=SHIPQTY}" Header="客户取样" Width="SizeToCells" MinWidth="50" />
                        <DataGridTextColumn Binding="{Binding Path=STOCKQTY}" Header="结存" Width="SizeToCells" MinWidth="50" />

                    </DataGrid.Columns>
                </DataGrid  >
            </WrapPanel>
        </StackPanel>
    </Grid>
</local:DocumentBase>
